package rasdev.brickdroid;

import rasdev.brickdroid.BrickdroidView.BrickdroidThread;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.view.SurfaceHolder;

public class Level {
	
	private SurfaceHolder mSurfaceHolder;	// Surface holder reference
	private Context mContext;	// Context reference
	private BrickdroidThread mThread;	// Thread reference
	
	/**
	 * Level constructor
	 * @param surfaceHolder
	 * @param context
	 * @param thread
	 */
	public Level(SurfaceHolder surfaceHolder, Context context, BrickdroidThread thread) {
		// Store references
		mSurfaceHolder = surfaceHolder;
		mContext = context;
		mThread = thread;
		
		
		
	}
	
	/**
	 * Level loader
	 * @param lvlId
	 */
	public void load(int lvlId) {
		
	}
	
	/**
	 * Draw level onto canvas
	 * @param canvas
	 */
	public void draw(Canvas canvas) {
		Paint p = new Paint();
        p.setColor(Color.WHITE);
        p.setStyle(Paint.Style.STROKE);
        
        int lineY = mThread.mCanvasHeight - 80;
        
        canvas.drawLine(0, lineY, mThread.mCanvasWidth, lineY, p);
	}
	
	/**
	 * Update level physics
	 */
	public void update() {
		
	}
}
